<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('检测报告基本列表')" />
	<!--<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: layout-latest-css" />
	<th:block th:include="include :: ztree-css" />
	<link th:href="@{/css/boot.css}" rel="stylesheet" />
	<link th:href="@{/css/city-picker.css}" rel="stylesheet"  />
	<script th:src="@{/js/jquery.m.js}"></script>
	<script th:src="@{/js/boot.js}"></script>
	<script th:src="@{/js/city-picker.data.js}"></script>
	<script th:src="@{/js/city-picker.js}"></script>
	<script th:src="@{/js/main.js}"></script>
	<th:block th:include="include :: footer" />-->
	<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: datetimepicker-js" />
	<link th:href="@{/css/city-picker.css}" rel="stylesheet"  />
	<script th:src="@{/js/city-picker.data.js}"></script>
	<script th:src="@{/js/city-picker.js}"></script>
	<th:block th:include="include :: layout-latest-css" />
	<th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
						<!--	<li>
								报告名称：<input type="text" name="reportName"/>
							</li>
							<li>
								机构名称：<input type="text" name="detectionName"/>
							</li>-->
							<!--<li>
								报告编号：<input type="text" name="reportNumber"/>
							</li>-->

						<!--	<li>
								项目名称：<input type="text" name="itemName"/>
							</li>-->

							<!--<li>
								项目地址：<input type="text" name="itemAddress"/>
							</li>-->
							<!--<li>
								<div class="ibox-content" style="padding-top: 0px;">
									<label style="margin-top: 10px;" >受检单位: </label>
									<select name="tradeProperty"  th:with="type=${@dict.getType('t_jc_flzddw')}">

										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
									</select>
								</div>
							</li>
							<li>
								<div class="ibox-content" style="padding-top: 0px;">
									<label style="margin-top: 10px;" >行业属性: </label>
									<select name="tradeProperty"  th:with="type=${@dict.getType('t_jc_flzddw')}">
										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
									</select>
								</div>
							</li>-->

							<!--<li>
								<div>
									<label style="margin-top: 0px;">防雷类别: </label>
									<select name="thunderCategory"  th:with="type=${@dict.getType('t_jc_flzddw_type')}">
										<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
									</select>
								</div>
							</li>-->
							<li>
								<p>检测年度:</p>
								<select name="detectionYear"  th:with="type=${@dict.getType('t_jc_flzddw_year')}">
									<option value=""></option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								<p>单位名称:</p>
								<input type="text" name="checkName"/>
							</li>
							<li>
								<p >所属区域:</p>
								<div class="col-sm-8" style="padding: 0px">
									<input name="district" id="district" class="form-control" readonly type="text"  data-toggle="city-picker">
								</div>
							</li>
							<li style="width: 295px">
								<p>行业属性:</p>
								<select name="tradeProperty"  th:with="type=${@dict.getType('t_jc_flzddw')}">
									<option value="">请选择行业属性</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								<p>防雷类别:</p>
								<select name="thunderCategory" th:with="type=${@dict.getType('t_jc_flzddw_type')}">
									<option value="" th:color="gray">请选择防雷级别</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>

							<li>
								<p>检测周期:</p>
								<select name="thunderCategory" th:with="type=${@dict.getType('t_jc_flzddw_time')}">
									<option value="" th:color="gray">请选择检测周期</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
                            <li class="select-time">
                              	<p>检测日期:</p>
                                <input  type="text"
									   class="time-input" id="startTime"
										placeholder="开始时间" name="detectionDate"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="detectionDateEnd"/>
                            </li>
							<li>
								<p>检测有效期:</p>
							<input type="date" name="detectionDateEnd"/>
							</li>

							<li>
								<p>检测结论:</p>
								<input type="text" name="detectionVerdict"/>
							</li>
<!--							<li>-->
<!--								检测周期：<input type="text" name="searchCycle"/>-->
<!--							</li>-->
							<li>
								<p>检测机构:</p>
								<input type="text" name="detectionName"/>
							</li>
							<!--<li>
								联系人：<input type="text" name="contacts"/>
							</li>

							<li>
								联系人电话：<input type="text" name="contactsPhone"/>
							</li>

							<li>
								检测年度：<input type="text" name="detectionYear"/>
							</li>-->

							<!--<div class="input-group date">
								<span class="input-group-addon"><i class="fa fa-calendar">检测日期</i></span>
								<input name="foundDate" type="text" class="form-control" id="datetimepicker-demo-1" placeholder="yyyy-MM-dd">
							</div>-->

							<!--<li>
								检测有效期至：<input type="date" name="detectionDateEnd"/>
							</li>

							<li>
								检测结论：<input type="text" name="detectionVerdict"/>
							</li>

							<li>
								检测机构id：<input type="text" name="detectionId"/>
							</li>-->



						<!--	<li>
								备注：<input type="text" name="remark"/>
							</li>-->



							<li>
								<a class="btn btn-primary btn-rounded btn-sm m50"
								   onclick="$.table.search()" id="search"><i
										class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm"  id = "reset" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:tJcJcbg:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:tJcJcbg:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:tJcJcbg:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:tJcJcbg:export">
						<i class="fa fa-download"></i> 批量导出
				 </a>-->
				<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:tJcJcbg:import">
					<i class="fa fa-upload"></i> 导入
				</a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
	 <!--<div th:include="include :: footer"></div>
	 &lt;!&ndash;<th:block th:include="include :: footer" />&ndash;&gt;
	 &lt;!&ndash;<th:block th:include="include :: datetimepicker-js" />&ndash;&gt;
	 <th:block th:include="include :: layout-latest-js" />
	 <th:block th:include="include :: ztree-js" />-->
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:tJcJcbg:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:tJcJcbg:remove')}]];
		var detailFlag = [[${@permission.hasPermi('system:tJcJcbg:detail')}]];
		var types = [[${@dict.getType('t_jc_flzddw_type')}]];
		var types1 = [[${@dict.getType('t_jc_flzddw_time')}]];
		var types2 = [[${@dict.getType('t_jc_flzddw_manage')}]];
		var types3 = [[${@dict.getType('t_jc_flzddw')}]];
        var prefix = ctx + "system/tJcJcbg";
        $(function() {
			$('#reset').bind('click',function(){
				$('[data-toggle="city-picker"]').citypicker('reset');

			});
			// $("#datetimepicker-demo-1").datetimepicker();
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
				importUrl: prefix + "/importData",
				importTemplateUrl: prefix + "/importTemplate",
				detailUrl: prefix + "/detail/{id}",
                modalName: "检测报告基本",
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'reportId', 
					title : '报告基本信息表主键',
					visible: false
				},
				// {
				// 	field : 'reportName',
				// 	title : '报告名称',
				// 	sortable: true
				// },
				// {
				// 	field : 'reportNumber',
				// 	title : '报告编号',
				// 	sortable: true
				// },
				//
				// {
				// 	field : 'itemName',
				// 	title : '项目名称',
				// 	sortable: true
				// },
					{
				 		field : 'checkName',
						title : '单位名称',
						sortable: true
					},
				{
					field : 'itemAddress',
					title : '项目地址',
					sortable: false,
				},
				{
					field : 'detectionDate',
					title : '检测日期',
					sortable: true,

				},
					{
						field : 'detectionName',
						title : '检测机构',
						sortable: true

					},
				{
					field : 'detectionDateEnd', 
					title : '检测有效期',
					sortable: true,

				},

				{
					field : 'searchCycle',
					title : '检测周期',
					formatter: function (value, row, index) {
						return $.table.selectDictLabel(types1, value);
					}

				},


					{
					 	field : 'detectionVerdict',
					 	title : '检测结论',
						sortable: true
					 },
					{
					field : 'detectionPerson',
					title : '检测人员',
					sortable: true
		},

				// {
				// 	field : 'searchCycle',
				// 	title : '检测周期',
				// 	formatter : function (value, row, index) {
                //         if(value == 1){
                //             return'<span class="label label-success">半年</span>';
				//
                //         }else if(value ==2 ){
                //             return '<span class="label label-success">一年</span>';
                //         }
                //     }
				//
				// },
				//
				/*{
					field : 'detectionId', 
					title : '检测机构id',
					sortable: true
				},*/

				// {
				// 	field : 'remark',
				// 	title : '备注',
				// 	sortable: true
				// },

		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-warning btn-xs ' + detailFlag +
								'" href="javascript:void(0)" onclick="$.operate.detailFull(\'' + row.reportId + '\')" style="margin-right: 5px;"><i class="fa fa-search"></i>详细</a>');
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.reportId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.reportId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
<script id="importTpl" type="text/template">
	<form enctype="multipart/form-data" class="mt20 mb10">
		<div class="col-xs-offset-1">
			<input type="file" id="file" name="file"/>
			<div class="mt10 pt5">
				<input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在，更新这条数据。"> 是否更新已经存在的用户数据
				&nbsp;	<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
			</div>
			<font color="red" class="pull-left mt10">
				提示：仅允许导入“xls”或“xlsx”格式文件！
			</font>
		</div>
	</form>
</script>
</html>